<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=7"/>
    <title>悦定后台管理系统</title>

    <!--判断是否登陆-->
    <script type="text/javascript" src="../../vendor/jquery-2.0.3.min.js"></script>
    <script type="text/javascript" src="../../js/config.js"></script>
    <script type="text/javascript" src="../../js/jquerySession.js"></script>
    <script type="text/javascript">
        if ($.session.get('token') == null) {
            alert("用户未登录！");
            window.location.href = "../../login.html"
        }
    </script>

    <link href="../../css/reset.css" rel="stylesheet" type="text/css"/>
    <link href="../../css/system.css" rel="stylesheet" type="text/css"/>
    <link href="../../css/table_form.css" rel="stylesheet" type="text/css"/>
    <link href="../../css/default.css" rel="stylesheet" type="text/css">
    <link rel="alternate stylesheet" type="text/css" href="../../css/styles2.css" title="styles2" media="screen">
    <link rel="alternate stylesheet" type="text/css" href="../../css/styles3.css" title="styles3" media="screen">
    <link rel="alternate stylesheet" type="text/css" href="../../css/styles4.css" title="styles4" media="screen">
    <script language="javascript" type="text/javascript" src="../../vendor/jquery.min.js"></script>
    <script language="javascript" type="text/javascript" src="../../js/admin_common.js"></script>
    <script language="javascript" type="text/javascript" src="../../js/styleswitch.js"></script>
    <script language="javascript" type="text/javascript" src="../../js/formvalidator.js" charset="UTF-8"></script>
    <script language="javascript" type="text/javascript" src="../../js/formvalidatorregex.js" charset="UTF-8"></script>
    <script type="text/javascript" charset="utf-8" src="../../vendor/kindeditor-all.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../vendor/zh-CN.js"></script>
    <script type="text/javascript">
        var editor;
        KindEditor.ready(function (K) {
            editor = K.create('textarea[name="content"]', {
                uploadJson: baseUrl + '/uploadImage',//上传
                allowFileManager: false,
                allowImageUpload : true,
                fullScreenMode:false,
                afterBlur: function () {
                    this.sync();
                }  //数据同步
            });
        });


        //获取url地址传递过来的参数
        function getUrlParam(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]);
            return null;
        }
        var id = getUrlParam("id");

        $.getJSON(baseUrl + "/missions/" + id, function (json) {
            if (json.meta.code == "200") {
                var data = json.data;
                $(".mission").val(data.name);
                editor.html(data.introduction)
            }
        })
    </script>
    <script type="text/javascript">
        window.focus();
    </script>
    <style type="text/css">
        html {
            _overflow-y: scroll
        }
    </style>
</head>
<body>
<div class="subnav">
</div>


<form name="myform" id="myform" action="#" method="post">
    <div class="pad-10">
        <div class="col-tab">
            <ul class="tabBut cu-li">
                <li id="tab_setting_1" class="on">添加任务</li>
            </ul>
            <div id="div_setting_1" class="contentList pad-10">

                <table width="100%" class="table_form ">
                    <tr>
                        <th>任务名称：</th>
                        <td>
                            <input type="text" name="mission" class="mission"/>
                        </td>
                    </tr>
                    <tr>
                        <th>任务描述：</th>
                        <td>
						<textarea id="editor_id" name="content" rows="" cols=""
                                  style="width: 250px;height: 80px;resize: none;text-align: left;">

						</textarea>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</form>
</body>

</html>